﻿<UserControl x:Class="WpfGauge.GoalMarker"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:local="clr-namespace:WpfGauge"
             DataContext="{Binding RelativeSource={RelativeSource Self}}"
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300">
    <Grid>
        <DockPanel Height="10" Width="{Binding Path=Width, RelativeSource={RelativeSource AncestorType={x:Type local:Gauge}, Mode=FindAncestor}}" 
                   Background="Transparent" RenderTransformOrigin="0.5,0.5" LastChildFill="False">
            <DockPanel.RenderTransform>
                <RotateTransform Angle="{Binding Path=Angle}" />
            </DockPanel.RenderTransform>
            <Rectangle Margin="5,0,0,0" Height="{Binding Path=MarkerHeight}" Width="{Binding Path=MarkerWidth}" 
                       Fill="{Binding Path=MarkerColor}" StrokeThickness="1" Stroke="Black"/>
        </DockPanel>
    </Grid>
</UserControl>
